<div style="float:right;height:30px;">

</div>
<!-----------------filter form ----------------------------------->
<form action="<?= $base_url; ?>/cart/order/" method="post">

    <?php
	if(!empty($order_message))
	{
		echo $order_message;
	}
	?>
     

<table class="carttable" style="font-size:17px;" cellpadding="0" cellspacing="0">
<tbody>
<tr class="cartHead">

<th class="tbname">&nbsp;</th>
<th class="tbname">Name</th>

<th class="tbname">Price(<img src="<?=$image_path?>Rs.png" height="10" width="10"/>)</th>
 
<th class="tbname">Quantity</th>
 
<th class="tbaction">Sub total(<img src="<?=$image_path?>Rs.png" height="10" width="10"/>)</th>
</tr>
<?php 
if(!empty($product)) {
	foreach($product as $key => $record) {
		$style = (++$key%2) ? '' : 'alt'; 
?>	
	<tr class="<?php echo $style;?>">
	
        <td><?php $img = $record['id'].".".$record['image'];?>
         <img src="<?= $image_path; ?>products/<?=$img; ?>" height="50" width="50" class="thumb"/>
         <br/><a href="<?=$base_url;?>cart/remove_item/<?=$record['id'] ?>" class="r_items"><span>remove item </span> </a>
         </td>
		<td><?php echo $record['name']?></td>
      
         <td><?php
		  if($record['special_cost'] >0)
		  {
		  echo $record['special_cost'];
		  $price  = $record['special_cost'];
		  }
		  else
		  {
		  echo $record['cost'];
		  $price  = $record['cost'];
		  }?></td>
       
         <td> <?= $_SESSION['prod'][$record['id']]['qty']?>   </td>
		<td>
                <?php
				$rate=$price * $_SESSION['prod'][$record['id']]['qty'];
				$total+= $rate;
		/*  if($record['special_cost'] >0)
		  echo $record['special_cost'];
		  else
		  echo $record['cost']?> */
		  echo  number_format($rate,2,'.','');
		  //number_format($info['cost'],2,'.',''
		  ?>

	
		</td>
	</tr>
    
<?php 
	}
	?>
	<tr>
    <td colspan="4" align="right"> <a href="<?=$base_url; ?>cart/add/">  BACK TO CART </a>&nbsp;&nbsp;
     &nbsp;&nbsp;&nbsp;<b>Total:</b>
    </td>
    <td><?=number_format($total,2,'.','');?>
    </td>
    </tr>
    <tr>
    <td colspan="5" align="right">
    <input type="submit" name="send" value="Send Order" class="order">
    </td>
    </tr>
    <?php
} else {
?>
<tr><td colspan="6">No products available</td></tr>
<?php }?>
</tbody>
</table>
<div class="spacer10 rightText">
<?php 	echo $this->pagination->create_links();?>
</div>
         
          

</form>